# Maintainer: Jakub Panek <me@panekj.dev>
pkgname=cargo-license
pkgver=0.5.1
pkgrel=4
pkgdesc="Cargo subcommand to see license of dependencies"
url="https://github.com/onur/cargo-license"
arch="all !s390x !riscv64" # rust
license="MIT"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://crates.io/api/v1/crates/cargo-license/$pkgver/download"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/cargo-license -t "$pkgdir"/usr/bin
}

sha512sums="
4d8d430df91c6aac53d2305d3125eaeee492324e85c4db29d33d452b3848f33a55088e71247c6c72c6a62f4e924a374a115bf14b4f398e7950b9eb52415f2244  cargo-license-0.5.1.tar.gz
"
